package com.daiyang.lottery.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserIdentityEnum {

    NORMAL("普通用户"),
    ADMIN("管理员");

    private final String name;

    public static  UserIdentityEnum forName(String name) {
        for(UserIdentityEnum userIdentityEnum :UserIdentityEnum.values()) {
            if(userIdentityEnum.name().equals(name)) {
                return userIdentityEnum;
            }
        }
        return null;
    }


}
